<?php
class Register_personal_model extends CI_Model {

	function register()
	{
		$data = array(
			'Meno' => $_POST['Meno'],
			'Priezvisko' => $_POST['Priezvisko'],
			'Rodne_cislo' => $_POST['Rodne_cislo'],
			'Uzivatelske_meno' => $_POST['Uzivatelske_meno'],
			'Heslo' => $_POST['Heslo'],
			'Oddelenie' => $_POST['Oddelenie'],
			'Specializacia' => $_POST['Specializacia'],
		);
		
		return $this->db->insert('Zdravotnicky_personal', $data);
		
	}
	
		function zoznam_oddeleni()
	{
		$this->db->select('Nazov_oddelenia');

        $query = $this->db->get('Oddelenie');
		
		  return $query->result_array();
	}
	
	function zoznam_rodnych_cisel_personalu()
	{
		$this->db->select('Rodne_cislo');

        $query = $this->db->get('Zdravotnicky_personal');
		
		  return $query->result_array();
	}
	
	function zoznam_uziv_mien_personalu()
	{
		$this->db->select('Uzivatelske_meno');

        $query = $this->db->get('Zdravotnicky_personal');
		
		  return $query->result_array();
	}
	
		function zoznam_uziv_mien_adminov()
	{
		$this->db->select('Uzivatelske_meno');

        $query = $this->db->get('Administrativni_pracovnici');
		
		  return $query->result_array();
	}
}